<template>
  <div class="header">
    <div class="top">
      <router-link to="/admin" class="logo">
        <span class="icon"></span>
        <span class="logotext">Web 聊天室后台管理</span>
      </router-link>
      <div class="login-info">
        <a href="#">{{ username }}</a>
    </div>
  </div>
  </div>
</template>
<script>
export default {
  name: 'adminHeader',
  data () {
    return {
      username: ''
    }
  },
  created() {
    this.username = this.getCookie('username');
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
@import "../../static/css/header.css";
</style>
